package com.warm.base.jdk.generic;

/**
 * @Description TODO
 * @Author iyb-liangchuang
 * @Date 2021/4/7 18:44
 */
public class GenericDemo<T> {

    /**
     * <> 里面的字母都代表 泛型标识, 返回值、入参都代表泛型标识
     */
    static <String, T, Ali> String get(String str, Ali ali){
        return str;
    }

    static <T> T get(T t){
        return t;
    }
    public static void main(String[] args) {
        int a = 1;
        Long b = 1L;
        int res = get(a, b);
        System.out.println(res);

        String c = "2";
        String res1 = get(c);
        System.out.println(res1);
    }
}
